﻿using System;
using System.Linq;
using System.Text;

using SqlSugar;
namespace Models
{
    ///<summary>
    ///
    ///</summary>
    [Tenant("1")]
    public partial class POItem
    {
           public POItem(){

            this.POItemId =Convert.ToString("substring(CONVERT([char](36),newid(),(0)),(1),(12))");
            this.ItemStates =Convert.ToString("10");
            this.ItemQtyRequired =Convert.ToDecimal("0");
            this.ItemQtyStarted =Convert.ToDecimal("0");
            this.ItemQtyReceived =Convert.ToDecimal("0");
            this.ItemQtyRejected =Convert.ToDecimal("0");
            this.ItemQtyEntry =Convert.ToDecimal("0");
            this.ItemQtySpareEntry =Convert.ToDecimal("0");
            this.ItemQtyBack =Convert.ToDecimal("0");
            this.ItemQtySpare =Convert.ToDecimal("0");
            this.IsBeyondDelivery =false;
            this.DeleteFlag =Convert.ToString("");
            this.ModifyDate =DateTime.Now;
            this.CreateDate =DateTime.Now;

           }
           /// <summary>
           /// Desc:采购单项目Id
           /// Default:substring(CONVERT([char](36),newid(),(0)),(1),(12))
           /// Nullable:False
           /// </summary>           
           [SugarColumn(IsPrimaryKey=true)]
           public string POItemId {get;set;}

           /// <summary>
           /// Desc:采购单Id
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string POId {get;set;}

           /// <summary>
           /// Desc:项目顺序号，一般可以用来与ERP中的项次对应
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string ItemSequence {get;set;}

           /// <summary>
           /// Desc:采购订单行状态 （创建 10、部分收货 20、全部收货 30、关闭 40）
           /// Default:10
           /// Nullable:True
           /// </summary>           
           public string ItemStates {get;set;}

           /// <summary>
           /// Desc:产品Id
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string ProductId {get;set;}

           /// <summary>
           /// Desc:行需求数量
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtyRequired {get;set;}

           /// <summary>
           /// Desc:母数量
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? MuQtyRequired {get;set;}

           /// <summary>
           /// Desc:启动数量
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtyStarted {get;set;}

           /// <summary>
           /// Desc:行接收数量
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtyReceived {get;set;}

           /// <summary>
           /// Desc:行验退数量
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtyRejected {get;set;}

           /// <summary>
           /// Desc:行仓库报废数量
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtyScrap {get;set;}

           /// <summary>
           /// Desc:行验报数量
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtyWScrap {get;set;}

           /// <summary>
           /// Desc:行仓退数量
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtyERejected {get;set;}

           /// <summary>
           /// Desc:行入库数量
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtyEntry {get;set;}

           /// <summary>
           /// Desc:行备品数量
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtySpareEntry {get;set;}

           /// <summary>
           /// Desc:备品入库数
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtyBack {get;set;}

           /// <summary>
           /// Desc:行备品数量
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public decimal? ItemQtySpare {get;set;}

           /// <summary>
           /// Desc:是否允许超收
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public bool? IsBeyondDelivery {get;set;}

           /// <summary>
           /// Desc:采购单位ID
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string PurchaseUOMId {get;set;}

           /// <summary>
           /// Desc:母单位
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string MuUOMid {get;set;}

           /// <summary>
           /// Desc:要求交货期
           /// Default:
           /// Nullable:True
           /// </summary>           
           public DateTime? DateRequired {get;set;}

           /// <summary>
           /// Desc:仓库id
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string Workcenterid {get;set;}

           /// <summary>
           /// Desc:是否交货完成
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string IsDelivery {get;set;}

           /// <summary>
           /// Desc:已删除 X
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string DeleteFlag {get;set;}

           /// <summary>
           /// Desc:ERP行id
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string ERPRow {get;set;}

           /// <summary>
           /// Desc:修改时间
           /// Default:DateTime.Now
           /// Nullable:True
           /// </summary>           
           public DateTime? ModifyDate {get;set;}

           /// <summary>
           /// Desc:成本中心
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string DeptCostID {get;set;}

           /// <summary>
           /// Desc:工单号码
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string MOName {get;set;}

           /// <summary>
           /// Desc:品名规格
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string ProductSpec {get;set;}

           /// <summary>
           /// Desc:采购单位
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string PurUomid {get;set;}

           /// <summary>
           /// Desc:采购量
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? PurQty {get;set;}

           /// <summary>
           /// Desc:单位一换算率(与采购单位)
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? UnitOneRate {get;set;}

           /// <summary>
           /// Desc:单位二换算率(与采购单位)
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? UnitTwoRate {get;set;}

           /// <summary>
           /// Desc:计价单位
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string ChargeUnitid {get;set;}

           /// <summary>
           /// Desc:计价数量
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? ChargeQty {get;set;}

           /// <summary>
           /// Desc:单价
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? UnitPrice {get;set;}

           /// <summary>
           /// Desc:含税单价
           /// Default:
           /// Nullable:True
           /// </summary>           
           public decimal? UnitPriceTax {get;set;}

           /// <summary>
           /// Desc:储位
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string StorageName {get;set;}

           /// <summary>
           /// Desc:批号
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string BatchNumber {get;set;}

           /// <summary>
           /// Desc:海关手册编号
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string CustomsNumber {get;set;}

           /// <summary>
           /// Desc:项目编号
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string ProjectRecordid {get;set;}

           /// <summary>
           /// Desc:任务编号
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string ProjectRecordItemid {get;set;}

           /// <summary>
           /// Desc:创建日期
           /// Default:DateTime.Now
           /// Nullable:True
           /// </summary>           
           public DateTime? CreateDate {get;set;}

    }
}
